package unipampa.extensions.games.pampaPife;

import com.smartfoxserver.v2.entities.User;
import com.smartfoxserver.v2.entities.data.ISFSObject;
import com.smartfoxserver.v2.entities.data.SFSObject;
import com.smartfoxserver.v2.extensions.BaseClientRequestHandler;

public class TratarPronto extends BaseClientRequestHandler{

	public void handleClientRequest(User usuario, ISFSObject params){
		PampaPifeExtension gameExt = (PampaPifeExtension) getParentExtension();
		if (gameExt.gameStarted) {
			trace("Entrou um espectador.");
			send("jaComecou", new SFSObject(), usuario);
		}
		else
			gameExt.atualizaNumeroJogadores();
	}
}
